{% extends 'base/base.html' %}
{% block cssjs %}
    {%  load static %}
    <link rel="stylesheet" href="{% static 'css/share_style0_16.css' %}">
    <link rel="stylesheet" href="{% static 'css/account.min.css' %}">

{% endblock %}

{% block content %}
    <div class="container web-body">

        <div class="row settings">
            <div class="col-md-12 column" style="margin-bottom: 50px;">
                <div class="tabbable" id="tabs">
                    <h2>账号设置</h2>
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="/user/account#tabPanel-1" data-toggle="tab" aria-expanded="true">个人信息</a>
                        </li>
                        <li class="">
                            <a href="/user/account#tabPanel-2" data-toggle="tab" aria-expanded="false">修改密码</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tabPanel-1">
                            <div class="col-md-8">
                                <form class="form-horizontal" role="form"  id="infoForm">
                                    <div class="form-group">
                                        <label for="name" class="col-md-2 control-label">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</label>
                                        <div class="col-md-8">
                                            <input type="text" class="form-control" id="name" value="" name="first_name" required="required">

                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="gender" class="col-md-2 control-label">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</label>
                                        <div class="radio-inline">
                                            <label style="margin-left: 20px;">
                                                <input data-check="true" id="gender" type="radio" name="gender" value="male" checked="checked">男
                                            </label>
                                        </div>
                                        <div class="radio-inline">
                                            <label>
                                                <input type="radio" checked="checked" name="gender" value="female">女
                                            </label>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="birthday" class="col-md-2 control-label" >出生日期</label>
                                        <div class="col-md-8">
                                            <input data-value="2017-12-12" type="date" class="form-control" id="birthday" name="birthday">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="telephone" class="col-md-2 control-label">手机号码</label>
                                        <div class="col-md-8">
                                            <input type="text" class="form-control" id="telephone" name="mobile" value="" >
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="job" class="col-md-2 control-label">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</label>
                                        <div class="col-md-8">
                                            <input type="hidden" name="work" id="jobHid" value="">
                                            <select class="form-control" name="work" hidefocus="true" id="job">
                                                <option value="" selected="selected">请选择职位</option>
                                                <option value="教师">交互设计师</option>
                                                <option value="研究员">产品经理</option>
                                                <option value="学生">学生</option>
                                                <option value="其它">其它</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="company" class="col-md-2 control-label">公司名称</label>
                                        <div class="col-md-8">
                                            <input type="text" class="form-control" id="company" name="unit" value=""  placeholder="目前就职公司">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="city" class="col-md-2 control-label">所在城市</label>
                                        <div class="col-md-8">
                                            <input type="text" class="form-control" id="city" name="city" value=""  placeholder="所在城市">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="profile" class="col-md-2  control-label">个人介绍</label>
                                        <div class="col-md-8">
                                            <textarea class="form-control" rows="2" id="profile" name="desc">这个家伙很懒，什么也没有留下～～！</textarea>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-offset-2 col-md-11">
                                            <button type="button" id="submit" onclick="upInfo()" class="btn btn-success">
                                                 <i class="glyphicon glyphicon-saved"></i> 更新资料
                                            </button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="col-md-4">
                                <div class="avatar">
                                    <img class="thumbnail" src="/static/img/man.jpg">
                                    <input type="file" name="icon" id="icon" accept="image/*" style="display: none;">
                                    <button id="upAvatar" class="btn btn-default">
                                        <i class="glyphicon glyphicon-cloud-upload"></i> 上传头像
                                    </button>
                                    <p style="padding-top: 10px;">选择图片上传, 大小不要超过 500 KB</p>
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane " id="tabPanel-2">
                            <div class="col-md-10 col-md-offset-1">
                            <p>请妥善保管好账户密码，定期修改密码，有助于账户安全。</p>
                            <hr>
                            <form class="form-horizontal" id="passwordForm" role="form">
                                <div class="form-group">
                                    <label for="password" class="col-sm-2 control-label">新密码</label>
                                    <div class="col-sm-4">
                                        <input type="password" class="form-control" id="password" name="password" required="required" >
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="confirmPass" class="col-sm-2 control-label">确认密码</label>
                                    <div class="col-sm-4">
                                        <input type="password" data-equals="password" name="confirmPass" class="form-control" id="confirmPass" required="required" >
                                    </div>
                                </div>
                                <div class="form-group" style="margin-top: 20px;">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="button" class="btn btn-success" onclick="changePass();">
                                            <i class="glyphicon glyphicon-saved"></i> 更新密码
                                        </button>
                                    </div>
                                </div>
                            </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}


{% block foot %}
    <script src="{% static 'js/jquery.validate.js' %}"></script>
        <script src="{% static 'js/messages_zh.js' %}"></script>

    <script src="{% static 'js/account.js' %}"></script>

    <script src="{% static 'js/mi.min.js' %}"></script>
{% endblock %}


